#pragma once
#include <iostream>
namespace ljt
{
#define MAX_SIZE 1000
	typedef int _elem;
	struct queue
	{
		_elem _data[MAX_SIZE];
		int _front, _rear;
	};
	void initQueue(queue& q)
	{
		q._front = 0;
		q._rear = -1;
	}
	void QueuePush(queue& q, _elem x)
	{
		q._data[++q._rear] = x;
	}
	void QueuePop(queue& q)
	{
		q._front++;
	}
	size_t size(queue& q)
	{
		return q._rear - q._front + 1;
	}

	_elem QueueFront(queue& q)
	{
		return q._data[q._front];
	}
	_elem QueueBack(queue& q)
	{
		return q._data[q._rear];
	}
}